﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HN.WxPayApiV3Partner.Model
{
    /// <summary>
    /// 常量信息 此接口只适用于服务商微信V3支付
    /// 懒，各种信息
    /// </summary>
    public static class V3Const
    {
        /// <summary>
        /// 服务商的私钥
        /// </summary>
        public static readonly string privateKey = @"MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCsspJlh2fr+6Zi
mWM5DxrNhC2WKnmXOEbXbQOwhO/LwoteEoHMWHVlAgyHI3bKC0GIm3YQwqUih5/D
N7Xyeic8sKed5ygHzebNH3P5DI3SCfF0RUq1yXazXvqnN4LRR3+3LJVBZMFUrtBj
urtTl1aWimXA1NvJTnHy4ocM2LeMC3mkD7cDh82weBFjCS/0SHvFbmoH2hB52ZDq
VIH+QpXBoeR7U5B/IsdGWzTqdaWC5vsrpzEjtdvQlnaldPD2+T/cAs8tZWE1Dcjp
+xMBDmR+mYNF263+I4vXcrLyW5uX9pVC+VSnBQsGEMVRxRTb8GrQ6E3lEN6BWwYG
3OAnCeFfAgMBAAECggEAbzpsM9wsQL9KAMNONtfVqXxyZ/9fZNgoOGPMNorIb3IT
lTlSRCzNH4tcSkW7IpJxWOzX9B+JgF3dtjxRgaTPVLVqn7bb/3rMJl0Vstg1F4yz
6PEgF0l0nD6WLdEA/o2QYoficcXVBxe4vCLut/4HFNp6guIV1OgjWA4ycUG7pgRG
v7Z6V8Fy9g6dxPOfG3lR5cdKsIeCriaReVFKeiSTGBMGKWiY5mtHzP+bFcQoFmsB
IqLVt6JeouTI3t0UjJuNh+W/LO0Qb4DWfiVkt+ixbv3cyb2iy5Yb9MeUXlWptY4g
Aguvj7e8rtwtblKYyiK9hfe8D4MbheULA4CZwCazgQKBgQDenMOxdr+R41HGpTYW
BfON8FRr1enfuExeudHI8Rs257irXZUYMFWeVzaId+OcCqOaYQegd24QEKFA0u2m
6zBEKbBOa7Xz7TzKD/TddBqzKsTtIAgg+DPO6M/l5Ook1xJv8kdhEjJSDZJCe0Gs
Dy1HVLWaG2bp7ov7MX0a0/+9IQKBgQDGmVIMxAjnziiuvg8L6hVu5jWiTPM9Zbu6
dOf1quVUBwiEQgHyQUNvvxOLuZ6UgrAvcxUgEaYdpIxGy0ylJJcIHu/nvBeKgo2s
zK6gaA56tXGC7KTPt7rhBm/+ivAvFURsP9lBJ7tSWUXZ1HzKuDFjgIhscdY8LpB+
0+WH6ytOfwKBgEH0XkKA9Ucq+3qITlr+Dmf6UXjVmwIun2ndUhtf2/lLdDpJcrgE
8gkEu+J46tW7jTdbEiBn4hMeajhDhifTPKylUVgar4ECw+T2D01hbduxi0DaIa5q
+yaNcbMiPIEHu62xMZbABmqrHK9Xx2BL6tVccqWjAr3CcHTO98rwDrAhAoGAN8Rn 
/MNX9Sz2ow6FeD4dFw+w6E6+AYwFgod7ZdmybyyyMkSHRzjdhkDLhBu5tE7xhsAr
Houso0QkRDXR0Q8F913pcSJKOV4N/z87Tf5wi7sCgYB1/2BaXngqkyQLmkaw5WEd
qGySWY2CdXz1pwBRkaLJ7P0mTIe7YYlZ4urmvIhvmlDvZ5bcboprvRAl/cazPuOZ
UDHsIPI1HM2dNzNjkTc9FpUZdmstMTJkBpzWFcuc1IZEMi2fK8AEHol8dEg50bFm
zkVF6LRqlQolDzfT/KLyXA==";
        /// <summary>
        /// 服务商的证书编号
        /// </summary>
        public static readonly string serialNo = "1111111111111111111111111111111111";
        /// <summary>
        /// 服务商的应用ID
        /// </summary>
        public static readonly string sp_appid = "wx11111111111111";
        /// <summary>
        /// 服务商的商户号
        /// </summary>
        public static readonly string sp_mchid = "166666666";
        /// <summary>
        /// 商户的应用ID
        /// </summary>
        public static readonly string sub_appid = "wx222222222222";

        /// <summary>
        /// 商户的商户号
        /// </summary>
        public static readonly string sub_mchid = "16888888888";
        /// <summary>
        /// 服务商的APIV3Key
        /// </summary>
        public static readonly string APIV3Key = "bjhnkjcnbjhnkjcnbjhnkjcnbjhnkjcn";
        /// <summary>
        /// 支付成功通知地址
        /// </summary>
        public static readonly string notify_url = "https://www.bjhnkj.cn";
        /// <summary>
        /// 退款结果通知地址 可配可不配置 商户平台配置即可
        /// </summary>
        public static readonly string notify_refunds_url = "https://www.bjhnkj.cn";
        #region 接口地址
        /// <summary>
        /// JSAPI下单
        /// </summary>
        public static readonly UrlMethod url_add_order = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/pay/partner/transactions/jsapi",
            method = "POST"
        };
        /// <summary>
        /// 查询订单API
        /// </summary>
        public static readonly UrlMethod url_search_order = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/pay/partner/transactions/id/{transaction_id}",
            method = "GET",
            path = "{transaction_id}"
        };
        /// <summary>
        /// 关闭订单API
        /// </summary>
        public static readonly UrlMethod url_close_order = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/pay/partner/transactions/out-trade-no/{out_trade_no}/close",
            method = "POST",
            path = "{out_trade_no}"
        };
        /// <summary>
        /// 申请退款API
        /// </summary>
        public static readonly UrlMethod url_order_refunds = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/refund/domestic/refunds",
            method = "POST"
        };
        /// <summary>
        /// 查询单笔退款API
        /// </summary>
        public static readonly UrlMethod url_search_order_domestic_refunds = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/refund/domestic/refunds/{out_refund_no}",
            method = "GET"
        };
        /// <summary>
        /// 申请交易账单API
        /// </summary>
        public static readonly UrlMethod url_order_tradebill = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/bill/tradebill",
            method = "GET"
        };
        /// <summary>
        /// 申请资金账单API
        /// </summary>
        public static readonly UrlMethod url_order_fundflowbill = new UrlMethod()
        {
            url = "https://api.mch.weixin.qq.com/v3/bill/fundflowbill",
            method = "GET"
        };
        #endregion


    }
    public class UrlMethod
    {
        public string url { get; set; }
        public string method { get; set; }
        public string path { get; set; }
    }

}
